package com.example.springboot_09_websocket;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

//@EnableWebSocket
//@SpringBootApplication
//public class Springboot09WebsocketApplication {
//
//    public static void main(String[] args) {
//        SpringApplication.run(Springboot09WebsocketApplication.class, args);
//    }
//    @Bean
//    public ServerEndpointExporter serverEndpointExporter() {
//        return new ServerEndpointExporter();
//    }
//}

@SpringBootApplication
public class Springboot09WebsocketApplication extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Springboot09WebsocketApplication.class);
    }
    public static void main(String[] args) {
        SpringApplication.run(Springboot09WebsocketApplication.class, args);
    }
}
